﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>

    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../public/login/css/base.css" />
<script type="text/javascript" src="../public/login/js/jquery.js"></script>
<script type="text/javascript" src="../public/login/js/login.js" charset="UTF-8"></script>
<script type="text/javascript" src="../public/login/js/jquery.validate.js"></script>
<script type="text/javascript" src="../public/login/js/jquery.metadata.js"></script>
<!-- <script type="text/javascript" src="theme/js/ieUpdateTips_4gzteacher_utf8.js"></script> -->
<!--[if lte IE 6]>
<script type="text/javascript" src="theme/js/DD_belatedPNG_0.0.8a.js"></script>
<script type="text/javascript">
	DD_belatedPNG.fix('.bg_png, .login_contianer, .ico_lock, .ico_user, .login_header .left, .login_header .right, .login_header .mid, .login_content .left, .login_content .right, .login_bottom .left, .login_bottom .right, .login_bottom .mid');
</script>
<![endif]-->
<style type="text/css">
.login_header .mid{line-height:normal;}
.logo{display:inline-block;margin:25px 10px 0 0;border-right:1px solid #c1c1c1;padding:20px 20px 0 0;}
.text{display:inline-block;position:relative;top:-6px;*top:-10px;}
</style>

<script type="text/javascript">
    
    $(function() {
    	
    	var validate = function() {
    		// 校验
    		var uid = $('input[name=username]').val();
    		var pwd = $('#password').val();
    		var cc = $('input[name=checkcode]').val();
    		if($.trim(uid)=='请输入用户名' || $.trim(uid)=='') {
    			$('#msg').text('请输入用户名');
    			userclick();
    			return false;
    		}
    		if($.trim(pwd)=='请输入密码' || $.trim(pwd)=='') {
    			$('#msg').text('请输入密码');
    			showpassword();
    			return false;
    		}
    		if($.trim(cc)=='请输入验证码' || $.trim(cc)=='') {
    			$('#msg').text('请输入验证码');
    			vercodeclick();
    			return false;
    		}
    		return true;
    	}
    	
    	var login = function() {
    		var name = $("#user_name").val();
	        var pwd = $("#user_pwd").val();
	        if($.trim(name)=='请输入用户名' || $.trim(name)==''){
	            $('#msg').text('请输入用户名');
	            userclick();
	            return;
	        }
	        if($.trim(pwd)=='请输入密码' || $.trim(pwd)==''){
	            $('#msg').text('请输入密码');
	            showpassword();
	            return;
	        }
	        $.ajax({
	            url:"login/login",
	            data:{user_name:name,user_pwd:pwd},
	            dataType:"JSON",
	            success:function(data){
	                if(data.success==1){
	                    window.location="index/index";
	                }
	            }
	        });
    	}
    	
    	$('#smt').click(function() {
	    	login();
    	});
    	
    	document.onkeydown = function(e)
    	{ 
        	var ev = document.all ? window.event : e;
        	if(ev.keyCode==13) 
    		{ 
        		if(validate()) {
    	    		login();
        		}
    		} 
    	};    	
    });

</script>
</head>

<body>
<form name="loginForm" action="/privilege/priUser/doLogin.do" method="post">
<input type="hidden" name="save" value="登录"/>
<div class="body_container" id="bodyContainer">
	<div class="loading" id="loading"></div>
    <div class="login_main hide" id="loginMain">
    	<div class="main_contianer">
        <div class="login_contianer">
            <div class="login_header">
                <div class="left"></div>
                <div class="right"></div>
                <div class="mid">
                
                   
                
                    <span class="text">朴石茗数据支撑系统</span>
                </div>
            </div>
            <div class="login_content">
                <div class="left"></div>
                <div class="right"></div>
                <div class="mid">
                    <div class="content_inner">
                        <div class="row_wrapper">
                            <p class="row_wrapper prompt" id="msg">&nbsp;</p>
                            <!--用户名(短)-->
                            <div class="input_box float_left">
                                <span>
                                    <i class="icon ico_user margin_r5"></i>
                                    <ins id="user_warpper">
                                    <input type="text" id="user_name" name="user_name" class="input_text common_input2" value="请输入用户名" onfocus="userclick();"  required msg="用户名不能为空"/></ins>
                                </span>
                            </div>
                            <!--用户名-->
                      </div>
                    
                     <div class="row_wrapper">
                        <!--密码-->
                        <div class="input_box" style="*float:left;">
                            <span>
                                  <i class="icon ico_lock margin_r5"></i><ins id="pwd_warpper">
                                  <input type="text" id="user_pwd" name="user_pwd" class="input_text common_input2" value="请输入密码"  onfocus="showpassword();" required msg="用户密码不能为空"/></ins>
                            </span> 
                        </div>
                        <!--密码-->
                     </div>
                    
                    <div class="row_wrapper">
                     
                    </div>
                     
                    <p class="row_wrapper"><a href="javascript:void(0)" class="login_in bg_png"  id="smt"></a></p>
                    </div>
                    
                 </div>
            </div>
            <div class="login_bottom">
                <div class="left"></div>
                <div class="right"></div>
                <div class="mid"></div>
            </div>
        </div>
           
        <p class="copyright">版权所有：朴石茗<span>&nbsp;</span></p>    
        <br/>    
       
        <br/>
    </div>
    </div>
    <div class="bg_main hide" id="mainBg">
        <img src="../public/login/images/bg_main011.jpg" orgwidth="1680" orgheight="764" />
    </div>
</div>
</form>

</body>
</html>